<template>
	<view>
		<u-navbar :background="background" back-text="" :back-text-style="backTextStyle" title-color="#fff"
			back-icon-color="#ffffff">
			<view class="slot-wrap">
				<slot></slot>
			</view>
		</u-navbar>
	</view>
</template>

<script>
	export default {
		data() {
			return {

			}
		},
		methods: {

		},
		props: {
			background: {
				type:Object,
				default: function() {
					return {
						backgroundImage: 'linear-gradient(45deg, #007fd1, #013cd2)'
					}
				}
			},
			backTextStyle: {
				default: function() {
					return {
						color: '#fff'
					}
				}
			},
		}
	}
</script>
</script>

<style lang="scss">
	.slot-wrap {
		display: flex;
		flex: 1; // 让slot内容占满整个导航栏的宽度 
		align-items: center;
		justify-content: center;
		color: #FFFFFF;
		font-size: 15px;
		// font-weight: bold;
		/* 让slot内容与导航栏左右有空隙 */
		/* padding: 0 30rpx; */
	}
</style>
